Introduction

In this activity you will setup the project structure and team repository for use during the duration of the entire term.

Step 1 and 2 are performed by only one member of the team selected by our instructor. If you can have the rest of the team present to observe, and ready for their part, that would be good. Otherwise you will share the information with them once you are done with your part. Each team member will then do Step 3 and 4 to clone repo, edit the project README.md file and add their name. Only one team member finishes the exercise doing Step 5 on behalf of the team.

Step 1 : (Selected Student) Access invitation to GitHub Classroom web link provided by instructor

  1. Use the link provided by your instructor to get to the correct place in Github Classroom.
  2. If necessary, Github Classroom may require you to login.
  3. Once in, you will be ask to Authorize GitHub Classroom. You don't need to do Grant anything other than the defaults. Just click to "Authorize github" (...they already know who you are)

Step 2 : (Selected Student) Creation of team repository

Only the ONE selected team member will do this:

  1. Since you are the first teammate to access this assignment, you will be required to enter fields to "Create a new team". Be sure to conform to the following naming convention as this action cannot be undone:

    Name the repo with this format: tttt-swen-261-ss-a-name where
  2. At this point, if all goes well, you will have connected to your team's organizaton (e.g. RIT-SWEN-261-13. Now:
    1. Share with your teammates the GitHub Classroom link you received from the instructor. This is not the URL for the github repo which you will use in Step 4. Have you team members follow instructions for Step 3 and then continue with Step 4.
    2. You can proceed directly to Step 4 at this point.

      It is possible that you will get an error regarding "fail to import commits". This is likely a timing issue. Wait a few minutes and try again by clicking Restart. If it continues to fail, take a screengrab and email it to your instructor.

Step 3 : (Non-selected students) Becoming part of the GitHub Classroom team AFTER selected student completes the above

If you are NOT the creator of the GitHub Classroom team only follow these steps AFTER your teammate gives you the go ahead and the link. Otherwise if you are the creator you should skip to Step 4.

  1. Access the link that you teammate provided you when they completed the GitHub Classroom creation.
  2. You will likely get asked to authenticate. Use your GitHub login credentials
  3. Once in to GitHub Classroom, you will be ask to Join an existing team. Be sure to select the correct one from the dropdown since this action cannot be undone. Double check BEFORE clicking "Join".
  4. You are ready to go! You will now be given the URL link to the team repository. (e.g. https://github.com/RIT-SWEN-12/team-project/.....) Click to go there now.
  5. Once in, you may be asked to Authorize GitHub Classroom. You don't need to do Grant anything other than the defaults. Just click to "Authorize github" (...they already know who you are)
  6. You will be redirected to your team's GitHub repository.
  7. It maybe the case that you get a message such as:

    We found an error during import

    It sometimes takes a while for the copy to occur so you should wait a few minutes and "Restart". If it continues to fail, take a screen grab and notify your instructor.

Step 4 : All team members clone repository and make local changes

Each team member does the following steps:

  1. If you have not done so already, login to your GitHub account and select your team repository. (Previous step should have gotten you there already)
  2. Clone the GitHub repository on your own machine using the command git clone your-remote-repo-URL where your-remote-repo-URL (ends in .git) is almost identical to the URL provided for you to get here. You can also obtain it from the "Clone or download" button. Just make sure it looks like (e.g. git clone https://github.com/SWEN-261-12/team-..... .git).
  3. Once you have a local copy, edit the README.md file in the section called Team. Add your name. First, replace the placeholder names. Add a new line if the placeholders are used by other team members already.
  4. Now stage (git status then git add .) and commit your name in README.md to the local repository with the command git commit -a -m "some commit message" where you substitute an appropriate commit message. Then push your change to the remote repository using the command git push.
  5. If you encounter an error, fatal: Authentication failed for 'https://github.com/username/repository.git/' , and you possibly have two-factor authentication enabled for GitHub, follow the following steps:
    1. In the upper righthand corner, navigate to your personal GitHub Settings page.
    2. Settings > Developer settings > Personal access tokens > Generate new token
    3. Give your token a name, I suggest the same name given to your team, outlined above.
    4. Select the permissions you desire for this access token, the most important to utilize this repo via the command line is 'repo'.
    5. Generate token.
    6. Copy and save this token, it will dissappear on page reload.
    7. Attempt to push again, using git push.
      Username: your_username
      Password: your_token
  6. If you had concurrent editing by multiple team members, you will receive a failed to push some refs error message, this indicates that your local repository is out-of-date with the remote because one of your teammates updated it while you were entering your name in your local copy of the repository. You must get it sync'ed with the remote before git will let you do the push.
    1. Use the command git pull to sync it.
    2. You will most likely see a CONFLICT when git tries to auto-merge the remote version of README.md with your version. Open the file and fix the conflict so that all of the names are there and you removed all the conflict indicators, i.e. <<<<<<<<, ========, >>>>>>>>.
    3. You will now have to commit the file with the correct names that resolved the conflict, and then push to remote.

Step 5 : Submission

After everyone has added their names to the README.md file, capture the log for the repository (make sure it is up-to-date with remote) using the command git log > github.txt, or by copy-and-paste of the log command output in the terminal window into a github.txt file. By the date specified in the schedule for your section, deposit that file to the GitHub repository - team dropbox in the myCourses dropbox Team Exercises area. Example output is shown below.

commit d03fc4b90ab35589c8445df0b94da65204708941
Merge: 4850e5d a4fdfd9
Author: Nicole Minton <nnm3367@rit.edu>
Date:   Mon Sep 25 08:34:38 2027 -0400

    Resolved conflict.

commit 4850e5daf7487f0512dea550b2d43e10cc38c67d
Author: Nicole Minton <nnm3367@rit.edu>
Date:   Mon Sep 25 08:31:00 2027 -0400

    Nicole added name
    
commit a4fdfd9b0b72ba7a8b19efdd445de05991b413fc
Author: Caitlin Klein <csk6489@rit.edu>
Date:   Mon Sep 25 08:30:29 2027 -0400

    Caitlin checking in

commit c778d914eb1a9d3092287e4577152cfeeffaca32
Merge: 98a0f1c 84ed6a8
Author: Joe Bills <jcb1234@rit.edu>
Date:   Mon Sep 25 08:26:39 2027 -0400

    Resolved conflict

commit 98a0f1c128dea0359f0dc34f70ddc891d5589979
Author: Joe Bills <jcb1234@rit.edu>
Date:   Mon Sep 25 08:18:16 2027 -0400

    Joe's name

commit 84ed6a8b9a6d2aa34ef6bbf21f766bdee78e7c7c
Author: Jimmy Veliagno <J.Veliagno@se.rit.edu>
Date:   Mon Sep 25 08:13:19 2027 -0400

    Jimmy

commit 1e2e69b9829f011b0a37ac46c4b0ccb518a81dee
Author: Jimmy Veliagno <J.Veliagno@se.rit.edu>
Date:   Mon Sep 25 07:49:57 2027 -0400

    First commit